﻿<Page
    x:Class="Coding4Fun.Toolkit.Test.WinPhone81.Samples.ChatBubbles.ChatBubbleTextBoxTests"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Coding4Fun.Toolkit.Test.WinPhone81.Samples.ChatBubbles"
    xmlns:c4f="using:Coding4Fun.Toolkit.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid x:Name="LayoutRoot">

        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Pivot Title="{StaticResource AppName}">
            <PivotItem Header="Basic">
                <ScrollViewer>
                    <StackPanel>
                    <c4f:ChatBubbleTextBox 
                        ChatBubbleDirection="UpperRight"
			            Text="testing normal" />

                    <c4f:ChatBubbleTextBox 
			            IsReadOnly="True"
			            Text="testing readonly"
                        ChatBubbleDirection="LowerLeft" />

                    <c4f:ChatBubbleTextBox 
			            Text="testing wrapping: coding4fun coding4fun coding4fun"
			            TextWrapping="Wrap"
			            />

                    <c4f:ChatBubbleTextBox 
						Margin="48, 0, 0, 0"
						Padding="24"
						Text="testing ReadOnly wrapping: coding4fun coding4fun coding4fun coding4fun" 
						IsReadOnly="True" 
						TextWrapping="Wrap" />

                    <c4f:ChatBubbleTextBox 
						Text="testing disabled" 
						IsEnabled="False" />
                    <TextBlock>System TextBoxes</TextBlock>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <TextBox Grid.Column="0" Text="normal" />
                        <TextBox Grid.Column="1" IsReadOnly="True" Text="readonly" />
                        <TextBox Grid.Column="2" IsEnabled="False" Text="disabled" />
                    </Grid>

                </StackPanel>
                </ScrollViewer>
            </PivotItem>
            <PivotItem Header="Direction">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="12" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="12" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <c4f:ChatBubbleTextBox 
							Grid.Row="0"
							Grid.Column="0"
							Text="UpperRight"
							ChatBubbleDirection="UpperRight" />
                    <c4f:ChatBubbleTextBox 
							Grid.Row="0"
							Grid.Column="2"
							Text="UpperLeft"
							ChatBubbleDirection="UpperLeft" />

                    <c4f:ChatBubbleTextBox 
							Grid.Row="2"
							Grid.Column="0"
							Text="LowerRight"
							ChatBubbleDirection="LowerRight" />

                    <c4f:ChatBubbleTextBox 
							Grid.Row="2"
							Grid.Column="2"
							Text="LowerLeft"
							ChatBubbleDirection="LowerLeft" />
                </Grid>
            </PivotItem>
            <PivotItem Header="Color">
                <StackPanel>
                    <c4f:ChatBubbleTextBox Background="Aqua" Text="Aqua Background" />
                    <c4f:ChatBubbleTextBox Foreground="Aqua" Text="Aqua Foreground" />
                    <c4f:ChatBubbleTextBox BorderBrush="Aqua" Text="Aqua BorderBrush" />

                    <c4f:ChatBubbleTextBox Text="Aqua selected background" />
                    <c4f:ChatBubbleTextBox Text="Aqua selected foreground" />
                </StackPanel>
            </PivotItem>
            <PivotItem Header="Hint">
                <ScrollViewer>
                    <StackPanel>
                        <c4f:ChatBubbleTextBox 
						    Hint="type a message"/>
                        <c4f:ChatBubbleTextBox 
						    Text="i'm a message with a hint"
						    Hint="type a message"/>
                        <c4f:ChatBubbleTextBox 
						    Hint="read only hint"
						    IsReadOnly="True"/>
                        <c4f:ChatBubbleTextBox 
						    Hint="read only hint"
						    Text="read only text"
						    IsReadOnly="True"/>
                        <c4f:ChatBubbleTextBox 
						    Hint="disabled hint"
						    IsEnabled="False"/>
                        <c4f:ChatBubbleTextBox 
						    Hint="disabled hint"
						    Text="disabled text"
						    IsEnabled="False"/>

                        <c4f:ChatBubbleTextBox 
						    x:Name="DynamicTextHintTest"
						    Hint="testing dynamic text"/>

                        <Button Click="AddTextClicked">Add text</Button>

                    </StackPanel>
                </ScrollViewer>
            </PivotItem>
        </Pivot>
    </Grid>
</Page>
